package com.example.mobile2021606163crw0506;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView tvMainTitle;
    private CheckBox ChkBoxMainYingqing;
    private CheckBox ChkBoxMainQianboli;
    private CheckBox ChkBoxMainLuntai;
    private CheckBox ChkBoxMainDipang;
    private CheckBox ChkBoxMainQiangai;
    private CheckBox ChkBoxMainXuangua;
    private CheckBox ChkBoxMainZuoyi;
    private CheckBox ChkBoxMainFangxiangpang;
    private CheckBox ChkBoxMainChejia;
    private CheckBox ChkBoxMainChemen;
    private CheckBox ChkBoxMainHouboli;
    private Button btnMainAdd;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
     btnMainAdd.setOnClickListener(new View.OnClickListener() {
         @Override
         public void onClick(View v) {
             Intent intent = new Intent(MainActivity.this,ShoppingActivity.class);
             startActivity(intent);
         }
     });

 }


    private void initView() {
        tvMainTitle = (TextView) findViewById(R.id.tv_main_title);
        ChkBoxMainYingqing = (CheckBox) findViewById(R.id.ChkBox_main_yingqing);
        ChkBoxMainQianboli = (CheckBox) findViewById(R.id.ChkBox_main_qianboli);
        ChkBoxMainLuntai = (CheckBox) findViewById(R.id.ChkBox_main_luntai);
        ChkBoxMainDipang = (CheckBox) findViewById(R.id.ChkBox_main_dipang);
        ChkBoxMainQiangai = (CheckBox) findViewById(R.id.ChkBox_main_qiangai);
        ChkBoxMainXuangua = (CheckBox) findViewById(R.id.ChkBox_main_xuangua);
        ChkBoxMainZuoyi = (CheckBox) findViewById(R.id.ChkBox_main_zuoyi);
        ChkBoxMainFangxiangpang = (CheckBox) findViewById(R.id.ChkBox_main_fangxiangpang);
        ChkBoxMainChejia = (CheckBox) findViewById(R.id.ChkBox_main_chejia);
        ChkBoxMainChemen = (CheckBox) findViewById(R.id.ChkBox_main_chemen);
        ChkBoxMainHouboli = (CheckBox) findViewById(R.id.ChkBox_main_houboli);
        btnMainAdd = (Button) findViewById(R.id.btn_main_add);
    }
}